package org.example.spring_ioc.controller;

import org.example.spring_ioc.component.UserComponent;
import org.example.spring_ioc.model.UserInfo;
import org.example.spring_ioc.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

@Controller
public class UserController {

    @Autowired
    private UserInfo userInfo;

//    private UserService userService;
//    private UserComponent userComponent;
//
//
//    public UserController(UserService userService) {
//        this.userService = userService;
//    }
//
//    @Autowired
//    public UserController(UserService userService, UserComponent userComponent) {
//        this.userService = userService;
//        this.userComponent = userComponent;
//    }



    public void sayHi(){
        System.out.println("Hi, Spring IoC!");
    }
}



